/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package CharliesCookies;

import com.dp1.pucp.Modelo.Usuario;
import com.dp1.pucp.RRHH.Controlador.BuscarRRHHControlador;
import com.dp1.pucp.RRHH.DAO.RRHHDAO;
import com.dp1.pucp.RRHH.Vista.BuscarRRHHGUI;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 *
 * @author pachon
 */
public class MainController {
    private MainMenuGUI view;
    private Usuario usuario;
    
    public MainController(MainMenuGUI view, Usuario usuario){
        this.view = view;
        this.usuario = usuario;
        this.view.llenarPanelInfo(usuario);
        this.view.addBuscarUsuarioMenutItem(new ShowUsuariosMenuItem());
        this.view.addMostrarSimulacionMapaMenutItem(new ShowSimulacionMenuItem());
        this.view.addSalirListener(new SalirListener());
        this.view.addBuscarEmpleadoMenutItem(new ShowEmpleadosMenuItem());
        view.setVisible(true);
        
    }
    class ShowEmpleadosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
            RRHHDAO dao = new RRHHDAO();
            BuscarRRHHGUI buscarEmpleadoGUI = new BuscarRRHHGUI();
            BuscarRRHHControlador controlador = new BuscarRRHHControlador(dao, buscarEmpleadoGUI);
            view.setCurrentPanel(buscarEmpleadoGUI);
            
        }
    }
    
    class ShowBuscarProductosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
            
        }
    }
    
    class ShowClienteMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
            
        }
    }
    class ShowPerfilMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
            
        }
    }
    class ShowUsuariosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
        }
    }
    class ShowBuscarPedidosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
        }
    }
    class ShowSimulacionMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
            
        }
    }
    class ShowVehiculosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
        }
    }
    
    class ShowTurnosMenuItem  implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            
        }
    }
    
    class SalirListener implements ActionListener {

        @Override
        public void actionPerformed(ActionEvent e) {
            view.dispose();
        }
    }
    
}
